package com.yserp.project.erp.store.inorder.domain;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yserp.framework.aspectj.lang.annotation.Excel;
import com.yserp.framework.web.domain.BaseEntity;
import com.yserp.project.erp.common.anno.MybatisLikeSearch;
import lombok.Data;

import java.util.Date;

/**
 * 商品入库单主对象 erp_in_order
 *
 * @author yserp
 * @date 2022-07-01
 */
@TableName("erp_in_order")
@Data
public class InOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 入库单编号
     */
    @Excel(name = "入库单编号")
    @MybatisLikeSearch
    private String orderCode;

    /**
     * 订单号
     */
    @Excel(name = "订单号")
    @MybatisLikeSearch
    private String orderName;

    /**
     * 入库类型(其他入库、采购入库)
     */
    @Excel(name = "入库类型",readConverterExp = "1=生产入库,2=采购入库")
    private String orderType;

    /**
     * 订单号
     */
    private Long sourceOrderId;

    /**
     * 订单号
     */
    @Excel(name = "来源订单号")
    private String sourceOrderNo;

    /**
     * 订单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /**
     * 供应商主键ID
     */
    private Long supplierId;

    /**
     * 供应商名称
     */
    @Excel(name = "供应商名称")
    @MybatisLikeSearch
    private String supplierName;

    /**
     * 单位关系主键ID
     */
    private Long warehouseId;

    /**
     * 对象单位名称
     */
    @Excel(name = "仓库名称")
    @MybatisLikeSearch
    private String warehouseName;

    /**
     * 库区ID
     */
    private Long reservoirId;

    /**
     * 库区名称
     */
    @Excel(name = "库区名称")
    private String reservoirName;

    /**
     * 状态
     */
    @Excel(name = "订单状态",readConverterExp = "0=待审核,1=已审核")
    private String status;

    /**
     * 关联出库单主键
     */
    private Long outboundOrderId;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    private String delFlag;


}
